package com.lrs.java.designPattern.behavioral.strategy;

public class FlatRateDiscountStrategy extends DiscountStrategy {

	private double flatRate;
	
	public FlatRateDiscountStrategy(double flatRate) {
		this.flatRate = flatRate;
	}

	public double getFlatRate() {
		return flatRate;
	}

	public void setFlatRate(double flatRate) {
		this.flatRate = flatRate;
	}

	@Override
	public double calcPrice(double price) {
		return price - flatRate;
	}
	
}
